package com.example.e_comm.utils;

import org.springframework.stereotype.Component;

import java.util.UUID;

@Component
public class TokenUtil {
    //生产Token
    public String generaToken() {
        return UUID.randomUUID().toString().replace("-", "");
    }
    //验证Token
    public boolean validateToken(String token) {
        return token != null && token.length() == 32;

    }
}
